import request from '@/utils/request'

// 我的合同
export function myContract(query) {
    return request({
        url: '/front/flat/contract/lesseeContract/lessees/list',
        method: 'get',
        params: query
    })
}

// 我的合同详情(纸质合同)
export function myPaperContractDetail(id) {
    return request({
        url: '/front/flat/contract/lesseeContract/' + id,
        method: 'get'
    })
}

// 我的合同详情(电子合同)
export function myEleContractDetail(id) {
    return request({
        url: '/front/flat/contract/lesseeContract/electronic/' + id,
        method: 'get'
    })
}


// 删除我的合同
export function deleteMyContract(id) {
    return request({
        url: '/front/flat/contract/lesseeContract/' + id,
        method: 'delete'
    })
}


// 根据合同id查询账单
export function myBillListByContractId(lesseeContractId) {
    return request({
        url: '/front/flat/bill/house/contractId/' + lesseeContractId,
        method: 'get'
    })
}

// 租客签订合同
export function myContractSigning(data) {
    return request({
        url: '/front/flat/contract/lesseeContract/lessees/signing',
        method: 'post',
        data
    })
}

// 交割单列表 -查询租客合同列表
export function lesseesDeliveryOrderList(query) {
    return request({
        url: '/front/flat/contract/deliveryOrder/lessees/list',
        method: 'get',
        params: query
    })
}

// 租客交割单签订合同
export function lesseesDeliveryOrderSigning(data) {
    return request({
        url: '/front/flat/contract/deliveryOrder/lessees/signing',
        method: 'post',
        data
    })
}

// 交割单列表 -查询业主合同列表
export function proprietorDeliveryOrderList(query) {
    return request({
        url: '/front/flat/contract/deliveryOrder/proprietor/list',
        method: 'get',
        params: query
    })
}

// 租客交割单签订合同
export function proprietorDeliveryOrderSigning(data) {
    return request({
        url: '/front/flat/contract/deliveryOrder/proprietor/signing',
        method: 'post',
        data
    })
}

// 获取预览电子合同内容链接
export function getPreviewUrl (data) {
    return request({
        url: '/front/flat/contract/deliveryOrder/previewUrl',
        method: 'post',
        data
    })
}

